% % read data from matlabfig
% h=get(gca,'children');
% data=get(h,{'xdata','ydata','DisplayName','color'}); % x,y,legend,color
% 
% figure;
% for i=1:length(h)
% plot(-data{i,1},data{i,2},'-','linewidth',4);
% hold on;
% end
% legend(data{:,3})
clear;
shot='127328';
for time=7.5:0.5:10
    uiopen([shot,'@',num2str(time),'.fig'],1)
    h=get(gca,'children');
    data=get(h,{'xdata','ydata','DisplayName','color'});
    close;
% figure;
% for i=length(h):-1:1
%     x=data{i,1}
%     y=data{i,2}
%     plot(x,y,'linewidth',4);
%     hold on;
% end
% legend(data{4,3},data{3,3},data{2,3},data{1,3});
    rho=data{1,1};
    ne=data{1,2};
    save([shot,'_',num2str(time),'.mat'],'rho','ne')
end